package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Set;


/**
 * The persistent class for the PE_JURI database table.
 * 
 */
@Entity
@Table(name="PE_JURI")
public class PeJuri implements Serializable {
	private static final long serialVersionUID = 1L;
	private long peJuriId;
	private BigDecimal nuUsrs;
	private String prefCta;
	private String razSoc;
	private String siglas;
	private String tipoOrg;
	private Date tsUltAcc;
	private Set<Contrato> contratos;
	private Set<LineaPrepago> lineaPrepagos;
	private Set<OrgCta> orgCtas;
	private TmGiro tmGiro;
	private TmJurisdiccion tmJurisdiccion;
	private Persona persona;
	private PeNatu peNatu;
	private Set<PeNatu> peNatus;
	private Set<TmInstSir> tmInstSirs;

    public PeJuri() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="PE_JURI_ID", unique=true, nullable=false)
	public long getPeJuriId() {
		return this.peJuriId;
	}

	public void setPeJuriId(long peJuriId) {
		this.peJuriId = peJuriId;
	}


	@Column(name="NU_USRS", precision=3)
	public BigDecimal getNuUsrs() {
		return this.nuUsrs;
	}

	public void setNuUsrs(BigDecimal nuUsrs) {
		this.nuUsrs = nuUsrs;
	}


	@Column(name="PREF_CTA", nullable=false, length=12)
	public String getPrefCta() {
		return this.prefCta;
	}

	public void setPrefCta(String prefCta) {
		this.prefCta = prefCta;
	}


	@Column(name="RAZ_SOC", nullable=false, length=100)
	public String getRazSoc() {
		return this.razSoc;
	}

	public void setRazSoc(String razSoc) {
		this.razSoc = razSoc;
	}


	@Column(length=50)
	public String getSiglas() {
		return this.siglas;
	}

	public void setSiglas(String siglas) {
		this.siglas = siglas;
	}


	@Column(name="TIPO_ORG", nullable=false, length=1)
	public String getTipoOrg() {
		return this.tipoOrg;
	}

	public void setTipoOrg(String tipoOrg) {
		this.tipoOrg = tipoOrg;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_ACC")
	public Date getTsUltAcc() {
		return this.tsUltAcc;
	}

	public void setTsUltAcc(Date tsUltAcc) {
		this.tsUltAcc = tsUltAcc;
	}


	//bi-directional many-to-one association to Contrato
	@OneToMany(mappedBy="peJuri")
	public Set<Contrato> getContratos() {
		return this.contratos;
	}

	public void setContratos(Set<Contrato> contratos) {
		this.contratos = contratos;
	}
	

	//bi-directional many-to-one association to LineaPrepago
	@OneToMany(mappedBy="peJuri")
	public Set<LineaPrepago> getLineaPrepagos() {
		return this.lineaPrepagos;
	}

	public void setLineaPrepagos(Set<LineaPrepago> lineaPrepagos) {
		this.lineaPrepagos = lineaPrepagos;
	}
	

	//bi-directional many-to-one association to OrgCta
	@OneToMany(mappedBy="peJuri")
	public Set<OrgCta> getOrgCtas() {
		return this.orgCtas;
	}

	public void setOrgCtas(Set<OrgCta> orgCtas) {
		this.orgCtas = orgCtas;
	}
	

	//bi-directional many-to-one association to TmGiro
    @ManyToOne
	@JoinColumn(name="GIRO_ID")
	public TmGiro getTmGiro() {
		return this.tmGiro;
	}

	public void setTmGiro(TmGiro tmGiro) {
		this.tmGiro = tmGiro;
	}
	

	//bi-directional many-to-one association to TmJurisdiccion
    @ManyToOne
	@JoinColumn(name="JURIS_ID", nullable=false)
	public TmJurisdiccion getTmJurisdiccion() {
		return this.tmJurisdiccion;
	}

	public void setTmJurisdiccion(TmJurisdiccion tmJurisdiccion) {
		this.tmJurisdiccion = tmJurisdiccion;
	}
	

	//bi-directional many-to-one association to Persona
    @ManyToOne
	@JoinColumn(name="PERSONA_ID", nullable=false)
	public Persona getPersona() {
		return this.persona;
	}

	public void setPersona(Persona persona) {
		this.persona = persona;
	}
	

	//bi-directional many-to-one association to PeNatu
    @ManyToOne
	@JoinColumn(name="REPRES_ID")
	public PeNatu getPeNatu() {
		return this.peNatu;
	}

	public void setPeNatu(PeNatu peNatu) {
		this.peNatu = peNatu;
	}
	

	//bi-directional many-to-one association to PeNatu
	@OneToMany(mappedBy="peJuri")
	public Set<PeNatu> getPeNatus() {
		return this.peNatus;
	}

	public void setPeNatus(Set<PeNatu> peNatus) {
		this.peNatus = peNatus;
	}
	

	//bi-directional many-to-one association to TmInstSir
	@OneToMany(mappedBy="peJuri")
	public Set<TmInstSir> getTmInstSirs() {
		return this.tmInstSirs;
	}

	public void setTmInstSirs(Set<TmInstSir> tmInstSirs) {
		this.tmInstSirs = tmInstSirs;
	}
	
}